"""
@author: haha
@file: celery_config.py
@time: 2023/3/8 0008 16:36:36
"""
from celery.schedules import crontab

# 配置消息中间件的地址
BROKER_URL = "redis://192.168.152.141:6379/1"

# 结果存放
CELERY_RESULT_BACKEND = "redis://192.168.152.141:6379/2"

# 启动celery是，导入任务
CELERY_IMPORTS = (
    'celery_app.tasks'
)
CELERYBEAT_SCHEDULE = {
    'sctl-crontab': {
        'task': 'celery_app.tasks.scheduled_task',
        'args': ("hello", "world"),
        'schedule': crontab(minute='*/1')
    }
}
